package com.foryou.wechat.service;

import com.foryou.wechat.utils.Response;
import org.springframework.web.multipart.MultipartFile;

/**
 * <h1>聊天接口信息汇总</h1>
 * Created by Lee.
 */
public interface ChatService {

    /**
     * <h2>得到聊天列表</h2>
     * @param userId
     * @return
     */
    Response getChatList(Long userId,int start);

    /**
     * <h2>判断是否是第一次聊天</h2>
     * @param anotherId
     * @return
     */
    boolean isFirstChat(Long anotherId);

    /**
     * <h2>打开聊天窗口</h2>
     * @param anotherId
     * @return
     */
    Response openChatWindow(Long anotherId);

    /**
     * <h2>得到聊天记录</h2>
     * @param chatId
     * @return
     */
    Response getUserChatLog(Long chatId);

    /**
     * <h2>发送文本类消息</h2>
     * @param chatId
     * @param content
     * @return
     */
    Response sendTextMessage(Long chatId,String content);

    /**
     * <h2>发送媒体类消息</h2>
     * @param chatId
     * @param file
     * @return
     */
    Response sendAudioMessage(Long chatId,String duration, MultipartFile file);

    /**
     * <h2>发送图片消息</h2>
     * @param chatId
     * @param file
     * @return
     */
    Response sendImageMessage(Long chatId, MultipartFile file);

    /**
     * <h2>上线OR下线</h2>
     * @param userId
     * @param chatId
     * @return
     */
    Response onlineOrOffline(Long userId, Long chatId);

    /**
     * <h2>从列表移除</h2>
     * @param chatId
     * @param userId
     * @return
     */
    Response removeList(Long chatId, Long userId);
}
